package cn.web;

import cn.web.entity.person;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.List;


@RestController
public class DemoController {
    @RequestMapping("/download")
    public String download(){
        System.out.println("sssss");
      return "index";
    }
@RequestMapping("/query")
@ResponseBody
    public List<person>query(){
    System.out.println("query");
    return Arrays.asList(new person(1,"张三",18)
                                     ,new person(2,"zhangsan3",19)
                                    ,new person(3,"zhangsan4",19));

}


}
